package logic

import (
	"context"

	"go-zero-mult/service/rpc/good/good_pb"
	"go-zero-mult/service/rpc/good/internal/svc"

	"github.com/tal-tech/go-zero/core/logx"
)

type GetGoodLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewGetGoodLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetGoodLogic {
	return &GetGoodLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *GetGoodLogic) GetGood(in *good_pb.GoodReq) (*good_pb.GoodResp, error) {
	// todo: add your logic here and delete this line

	return &good_pb.GoodResp{
		Id: in.Id,
		GoodName: "商品名称",
		Desc: "自定义的商品描述",
	}, nil
	//return &good_pb.GoodResp{}, nil
}
